/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bean;

import business.UserBusiness;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import model.Customer;

/**
 *
 * @author Administrator
 */
@ManagedBean
@RequestScoped
public class RegisterBean {
    private UserBusiness userBusiness = new UserBusiness();
    private Customer customer;

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    public String registerAction(){
        if(userBusiness.register(customer)){
            return "../index.xhtml";
        }
        return "indextest.xhtml";
    }
    /** Creates a new instance of RegisterBean */
    public RegisterBean() {
        customer = new Customer();
    }

}
